/*
 * 패키지 이름 적절히 바꾸세요
 */
package test;

import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.FlowLayout;
import java.util.ArrayList;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
import javax.swing.table.DefaultTableModel;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.JComboBox;

import java.awt.event.ItemListener;
import java.awt.event.ItemEvent;
import java.awt.Font;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.border.LineBorder;

public class DogMain extends JFrame {

	private JPanel contentPane;
	private JTable dogTable;		// 유기견 테이블
	private JTable empTable;		// 직원 테이블
	private JTable adoTable;		// 입양자 테이블
	private JTextField Id;			// 로그인 화면에서 아이디 입력 필드
	private JPasswordField pwd;		// 로그인 화면에서 비밀번호 입력 필드
	private JButton loginBtn; 		// 로그인 화면에서 로그인 버튼
	private JButton regBtn; 		// 로그인 화면에서 회원 가입 버튼
	private JTextField searchBtn;	// 로그아웃 화면에서 검색 버튼
	private JButton logoutBtn;		// 로그아웃 화면에서 로그아웃 버튼
	private JLabel txtInfo;			// 로그아웃 화면에서 사용자 이름이나 정보가 표시되는 라벨
	private AdoptersDAO adao = new AdoptersDAO();
	private JTextField whereTxt;
	private SearchDAO sdao = new SearchDAO();
	private AdoptersVO avo;
	private ArrayList<AdoptersVO> alist;
	private JLabel id;
	private JLabel name;
	private JLabel addr;
	private JLabel addrsp;
	private JLabel tel;
	private JLabel regdate;
	private JLabel rep;
	private JLabel grant;
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					DogMain frame = new DogMain();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}
	
	
	/*
	 * 기본 생성자
	 */
	public DogMain(){
		initialize();
	}
	
	/*
	 * Create the frame.
	 * 
	 * 기본 판넬 구조
	 * contentPane	- headpanel ; 윗 부분 개그림 레이블이 들어가는 판넬
	 * 				- memberPanel ; 로그인 폼이 들어가는 판넬
	 * 							- loginPanel ; 로그인 화면이 표시되는 판넬
	 * 							- logoutPanel ; 로그인 후의 화면이 표시되는 판넬
	 * 				- mainPanel	; 아랫 부분이 주요 내용들이 표시되는 판넬 cardLayout으로 구성
	 * 							- tabPanel ; 각 탭들이 들어가는 판넬
	 * 							- indexPanel ; 프로그램 최초 구동시 표시되는 판넬
	 * 							- myPanel ; 회원 정보 수정 및 삭제를 표시하는 판넬
	 * 							- adminpanel ; 관리자용 관리 페이지가 표시되는 판넬
	 */				
	private void initialize() {
		setTitle("유기견 관리 프로그램");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 1024, 768);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		JPanel headPanel = new JPanel();
		headPanel.setMaximumSize(new Dimension(32767, 200));
		headPanel.setPreferredSize(new Dimension(10, 100));
		headPanel.setBackground(Color.LIGHT_GRAY);
		contentPane.add(headPanel, BorderLayout.NORTH);
		
		JPanel memberPanel = new JPanel();
		memberPanel.setMaximumSize(new Dimension(32767, 100));
		contentPane.add(memberPanel, BorderLayout.CENTER);
		memberPanel.setLayout(new CardLayout(0, 0));
		
		JPanel loginPanel = new JPanel();
		FlowLayout flowLayout = (FlowLayout) loginPanel.getLayout();
		flowLayout.setVgap(20);
		flowLayout.setHgap(20);
		flowLayout.setAlignment(FlowLayout.LEFT);
		memberPanel.add(loginPanel, "loginPanel");
		
		JLabel txtId = new JLabel("아이디");
		loginPanel.add(txtId);
		
		Id = new JTextField();
		loginPanel.add(Id);
		Id.setColumns(10);
		
		JLabel txtBlank1 = new JLabel("    ");
		loginPanel.add(txtBlank1);
		
		JLabel txtPwd = new JLabel("비밀번호");
		loginPanel.add(txtPwd);
		
		pwd = new JPasswordField();
		loginPanel.add(pwd);
		pwd.setColumns(10);
		
		JLabel txtBlank2 = new JLabel("    ");
		loginPanel.add(txtBlank2);
		
		loginBtn = new JButton("로그인");
		loginPanel.add(loginBtn);
		
		JLabel txtBlank3 = new JLabel("    ");
		loginPanel.add(txtBlank3);
		
		regBtn = new JButton("회원가입");
		loginPanel.add(regBtn);
		
		JPanel logoutPanel = new JPanel();
		FlowLayout flowLayout_1 = (FlowLayout) logoutPanel.getLayout();
		flowLayout_1.setVgap(20);
		flowLayout_1.setHgap(20);
		flowLayout_1.setAlignment(FlowLayout.LEFT);
		memberPanel.add(logoutPanel, "logoutPanel");
		
		txtInfo = new JLabel("000님 로그인 하셨습니다.");
		logoutPanel.add(txtInfo);
		
		logoutBtn = new JButton("로그아웃");
		logoutPanel.add(logoutBtn);
		
		JLabel txtSearch = new JLabel("검색");
		logoutPanel.add(txtSearch);
		
		searchBtn = new JTextField();
		logoutPanel.add(searchBtn);
		searchBtn.setColumns(10);
		
		
		
		

		/*
		 * 메인 부분의 표시 패널
		 */
		JPanel mainPanel = new JPanel();
		mainPanel.setPreferredSize(new Dimension(10, 550));
		contentPane.add(mainPanel, BorderLayout.SOUTH);
		mainPanel.setLayout(new CardLayout(0, 0));
		
		

		/*
		 * 탭 패널 설정
		 */
		JTabbedPane tabPanel = new JTabbedPane(JTabbedPane.TOP);
		mainPanel.add(tabPanel, "tabPanel");
		
		
		

		/*
		 * 유기견 관리 패널
		 */
		JPanel dogPanel = new JPanel();
		tabPanel.addTab("DOG", null, dogPanel, null);
		dogPanel.setLayout(new BorderLayout(0, 0));
		
		JScrollPane dogScroll = new JScrollPane();
		dogScroll.setPreferredSize(new Dimension(2, 200));
		dogPanel.add(dogScroll, BorderLayout.NORTH);
		
		dogTable = new JTable();
		dogTable.setPreferredScrollableViewportSize(new Dimension(32767, 32767));
		dogTable.setPreferredSize(new Dimension(2, 200));
		dogScroll.setViewportView(dogTable);
		
		JPanel dogDetail = new JPanel();
		dogDetail.setPreferredSize(new Dimension(490, 10));
		dogPanel.add(dogDetail, BorderLayout.WEST);
		GroupLayout gl_dogDetail = new GroupLayout(dogDetail);
		gl_dogDetail.setHorizontalGroup(
			gl_dogDetail.createParallelGroup(Alignment.LEADING)
				.addGap(0, 490, Short.MAX_VALUE)
		);
		gl_dogDetail.setVerticalGroup(
			gl_dogDetail.createParallelGroup(Alignment.LEADING)
				.addGap(0, 321, Short.MAX_VALUE)
		);
		dogDetail.setLayout(gl_dogDetail);
		
		JPanel dogMenu = new JPanel();
		dogMenu.setPreferredSize(new Dimension(500, 10));
		dogPanel.add(dogMenu, BorderLayout.EAST);
		
		

		/*
		 * 직원 관리 패널
		 */
		JPanel empPanel = new JPanel();
		tabPanel.addTab("EMPLOYEE", null, empPanel, null);
		empPanel.setLayout(new BorderLayout(0, 0));
		
		JScrollPane empScroll = new JScrollPane();
		empScroll.setPreferredSize(new Dimension(2, 200));
		empPanel.add(empScroll, BorderLayout.NORTH);
		
		empTable = new JTable();
		empTable.setPreferredSize(new Dimension(0, 200));
		empScroll.setViewportView(empTable);
		
		JPanel empDetail = new JPanel();
		empDetail.setPreferredSize(new Dimension(490, 10));
		empPanel.add(empDetail, BorderLayout.WEST);
		
		JPanel empMenu = new JPanel();
		empMenu.setPreferredSize(new Dimension(500, 10));
		empPanel.add(empMenu, BorderLayout.EAST);

		
		
		/*
		 * 입양자 관리 패널
		 */
		JPanel adoPenel = new JPanel();
		tabPanel.addTab("ADOPTER", null, adoPenel, null);
		adoPenel.setLayout(new BorderLayout(0, 0));
		
		JScrollPane adoScroll = new JScrollPane();
		adoScroll.setPreferredSize(new Dimension(2, 200));
		adoPenel.add(adoScroll, BorderLayout.NORTH);
		
		ArrayList<AdoptersVO> list = adao.selectAdopter();
		
		final DefaultTableModel model = new DefaultTableModel(){
			@Override
			public boolean isCellEditable(int row, int column) {
				return false;
			}
		};
		
		model.setColumnIdentifiers(new String[] {"입양자ID","입양자이름","전화번호","등록일"});
		
		for(AdoptersVO a : list){
			model.addRow(new String[] {a.getAdono(),a.getAdoname(),a.getTel(),a.getRegdate()});
		}
		
		adoTable = new JTable();
		adoTable.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				JTable t = (JTable)e.getSource();
				if (e.getClickCount() == 2){
					// 회원 상세정보 출력
					int r = adoTable.getSelectedRow();
					String no = (String) adoTable.getValueAt(r, 0);
					AdoptersVO svo = new AdoptersDAO().selectOneAdopter(no);
					
					id.setText(svo.getAdono());
					name.setText(svo.getAdoname());
					addr.setText(svo.getAddress());
					addrsp.setText(svo.getAddress_spec());
					tel.setText(svo.getTel());
					regdate.setText(svo.getRegdate());
					rep.setText(svo.getRepno());
					grant.setText(svo.getGrants());
				}
			}
		});
		adoTable.setModel(model);
		adoTable.setPreferredSize(new Dimension(0, 200));
		adoScroll.setViewportView(adoTable);
		
		JPanel adoDetail = new JPanel();
		adoDetail.setBorder(new LineBorder(new Color(0, 0, 0)));
		adoDetail.setPreferredSize(new Dimension(640, 10));
		adoPenel.add(adoDetail, BorderLayout.WEST);
		
		JLabel lblId = new JLabel("입양자 ID :");
		lblId.setFont(new Font("굴림", Font.BOLD, 16));
		
		id = new JLabel(" ");
		id.setFont(new Font("굴림", Font.BOLD, 16));
		
		name = new JLabel(" ");
		name.setFont(new Font("굴림", Font.BOLD, 16));
		
		JLabel label_2 = new JLabel("이름       :");
		label_2.setFont(new Font("굴림", Font.BOLD, 16));
		
		addr = new JLabel(" ");
		addr.setFont(new Font("굴림", Font.BOLD, 14));
		
		JLabel label_4 = new JLabel("주소       :");
		label_4.setFont(new Font("굴림", Font.BOLD, 16));
		
		addrsp = new JLabel(" ");
		addrsp.setFont(new Font("굴림", Font.BOLD, 14));
		
		JLabel label_6 = new JLabel("상세주소 : ");
		label_6.setFont(new Font("굴림", Font.BOLD, 16));
		
		tel = new JLabel(" ");
		tel.setFont(new Font("굴림", Font.BOLD, 16));
		
		regdate = new JLabel("");
		regdate.setFont(new Font("굴림", Font.BOLD, 16));
		
		JLabel label_9 = new JLabel("등록날짜 : ");
		label_9.setFont(new Font("굴림", Font.BOLD, 16));
		
		rep = new JLabel("");
		rep.setFont(new Font("굴림", Font.BOLD, 16));
		
		JLabel label_11 = new JLabel("담당직원 :");
		label_11.setFont(new Font("굴림", Font.BOLD, 16));
		
		grant = new JLabel("");
		grant.setFont(new Font("굴림", Font.BOLD, 16));
		
		JLabel label_13 = new JLabel("지급금액 :");
		label_13.setFont(new Font("굴림", Font.BOLD, 16));
		
		JLabel label_14 = new JLabel("전화번호 : ");
		label_14.setFont(new Font("굴림", Font.BOLD, 16));
		
		JLabel lblNewLabel = new JLabel("");
		lblNewLabel.setBorder(new LineBorder(Color.LIGHT_GRAY));
		GroupLayout gl_adoDetail = new GroupLayout(adoDetail);
		gl_adoDetail.setHorizontalGroup(
			gl_adoDetail.createParallelGroup(Alignment.TRAILING)
				.addGroup(gl_adoDetail.createSequentialGroup()
					.addGap(52)
					.addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 129, GroupLayout.PREFERRED_SIZE)
					.addGap(46)
					.addGroup(gl_adoDetail.createParallelGroup(Alignment.LEADING)
						.addComponent(lblId)
						.addComponent(label_2)
						.addComponent(label_4)
						.addComponent(label_6)
						.addComponent(label_14)
						.addComponent(label_9)
						.addGroup(gl_adoDetail.createParallelGroup(Alignment.TRAILING, false)
							.addComponent(label_13, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
							.addComponent(label_11, Alignment.LEADING)))
					.addGap(18)
					.addGroup(gl_adoDetail.createParallelGroup(Alignment.LEADING)
						.addComponent(id, GroupLayout.PREFERRED_SIZE, 226, GroupLayout.PREFERRED_SIZE)
						.addGroup(gl_adoDetail.createParallelGroup(Alignment.TRAILING, false)
							.addComponent(name, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE)
							.addComponent(addr, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
							.addComponent(addrsp, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
							.addComponent(tel, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
							.addComponent(regdate, Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 224, GroupLayout.PREFERRED_SIZE))
						.addComponent(grant, GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE)
						.addComponent(rep, GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE))
					.addGap(85))
		);
		gl_adoDetail.setVerticalGroup(
			gl_adoDetail.createParallelGroup(Alignment.TRAILING)
				.addGroup(gl_adoDetail.createSequentialGroup()
					.addContainerGap(60, Short.MAX_VALUE)
					.addGroup(gl_adoDetail.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblId)
						.addComponent(id))
					.addGap(10)
					.addGroup(gl_adoDetail.createParallelGroup(Alignment.BASELINE)
						.addComponent(label_2)
						.addComponent(name))
					.addGap(10)
					.addGroup(gl_adoDetail.createParallelGroup(Alignment.BASELINE)
						.addComponent(label_4)
						.addComponent(addr))
					.addGap(10)
					.addGroup(gl_adoDetail.createParallelGroup(Alignment.BASELINE)
						.addComponent(label_6)
						.addComponent(addrsp))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_adoDetail.createParallelGroup(Alignment.BASELINE)
						.addComponent(label_14, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
						.addComponent(tel, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
					.addGap(7)
					.addGroup(gl_adoDetail.createParallelGroup(Alignment.TRAILING)
						.addComponent(label_9, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
						.addComponent(regdate, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
					.addGap(13)
					.addGroup(gl_adoDetail.createParallelGroup(Alignment.TRAILING)
						.addComponent(label_11, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
						.addComponent(rep, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(gl_adoDetail.createParallelGroup(Alignment.LEADING)
						.addComponent(label_13, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
						.addComponent(grant, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
					.addGap(45))
				.addGroup(gl_adoDetail.createSequentialGroup()
					.addGap(73)
					.addComponent(lblNewLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
					.addGap(57))
		);
		adoDetail.setLayout(gl_adoDetail);
		
		JPanel adoMenu = new JPanel();
		adoMenu.setBorder(new LineBorder(new Color(0, 0, 0)));
		adoMenu.setPreferredSize(new Dimension(350, 10));
		adoPenel.add(adoMenu, BorderLayout.EAST);
		
		JButton addBtn = new JButton("입양자 추가");
		addBtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				InsertAdo ado = new InsertAdo(adoTable, model);
				ado.setVisible(true);
			}
		});
		
		JButton modBtn = new JButton("입양자 수정");
		modBtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				int r = adoTable.getSelectedRow();
				
				if(r == -1){
					JOptionPane.showMessageDialog(null, "수정할 입양자를 선택하세요!!");
					return;
				} 
				
				String ano = adoTable.getValueAt(r, 0).toString();
				
				if(r != -1){
					UpdateAdo ua = new UpdateAdo(ano, r, adoTable);
					ua.setVisible(true);
				}  
			}
		});
		
		JButton delBtn = new JButton("입양자 삭제");
		delBtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				int choice = JOptionPane.showConfirmDialog(null, "정말 삭제하시겠어요?");
				if(choice == JOptionPane.YES_OPTION) {
					int r = adoTable.getSelectedRow();
					if(r==-1){
						JOptionPane.showMessageDialog(null, "삭제할 행을 선택하세요!");
						return;
					}
					String ano = adoTable.getValueAt(r, 0).toString();
					if(adao.deleteAdopter(ano) > 0){
						JOptionPane.showMessageDialog(null, "성공적으로 삭제됨");
						// 선택한 JTable의 기존행 삭제(바뀐 DB의 내용을 다시 그리기 위해)
						model.removeRow(r);
						// 삭제한 행을 JTable 반영해서 다시 출력
						adoTable.repaint();
					}
				}
			}
		});
		
		String[] data = {"입양자번호","입양자이름","전화번호","담당직원"}; 
		final JComboBox combo = new JComboBox(data);
		
		whereTxt = new JTextField();
		whereTxt.setColumns(10);
		
		JButton findBtn = new JButton("검색");
		findBtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				switch(combo.getSelectedIndex()){
					case 0: alist = sdao.selectAdono(whereTxt.getText()); break;
					case 1: alist = sdao.selectAdoname(whereTxt.getText()); break;
					case 2: alist = sdao.selectTel(whereTxt.getText()); break;
					case 3: alist = sdao.selectRep(whereTxt.getText()); break;
				}
				
				int rowCount = model.getRowCount();
				for(int i=0; i<rowCount; i++)
					model.removeRow(0);
				
				for(AdoptersVO a : alist){
					model.addRow(new String[] {a.getAdono(),a.getAdoname(),a.getTel(),a.getRegdate()});
				}
				
			}
		});
		
		JButton allData = new JButton("전체 데이터 보기");
		allData.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				int rowCount = model.getRowCount();
				for(int i=0; i<rowCount; i++){
					model.removeRow(0);
				}
				ArrayList<AdoptersVO> list = adao.selectAdopter();
				for(AdoptersVO a : list){
					model.addRow(new String[] {a.getAdono(),a.getAdoname(),a.getTel(),a.getRegdate()});
				}
			}
		});
		GroupLayout gl_adoMenu = new GroupLayout(adoMenu);
		gl_adoMenu.setHorizontalGroup(
			gl_adoMenu.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_adoMenu.createSequentialGroup()
					.addGroup(gl_adoMenu.createParallelGroup(Alignment.LEADING)
						.addGroup(gl_adoMenu.createSequentialGroup()
							.addContainerGap()
							.addGroup(gl_adoMenu.createParallelGroup(Alignment.LEADING, false)
								.addGroup(gl_adoMenu.createSequentialGroup()
									.addComponent(combo, GroupLayout.PREFERRED_SIZE, 99, GroupLayout.PREFERRED_SIZE)
									.addPreferredGap(ComponentPlacement.RELATED)
									.addComponent(whereTxt))
								.addGroup(gl_adoMenu.createSequentialGroup()
									.addComponent(addBtn)
									.addPreferredGap(ComponentPlacement.RELATED)
									.addComponent(modBtn)
									.addPreferredGap(ComponentPlacement.RELATED)
									.addComponent(delBtn)))
							.addGap(40))
						.addGroup(gl_adoMenu.createSequentialGroup()
							.addGap(80)
							.addComponent(findBtn)
							.addPreferredGap(ComponentPlacement.RELATED)
							.addComponent(allData)))
					.addContainerGap())
		);
		gl_adoMenu.setVerticalGroup(
			gl_adoMenu.createParallelGroup(Alignment.TRAILING)
				.addGroup(gl_adoMenu.createSequentialGroup()
					.addGap(54)
					.addGroup(gl_adoMenu.createParallelGroup(Alignment.BASELINE)
						.addComponent(addBtn)
						.addComponent(modBtn)
						.addComponent(delBtn))
					.addPreferredGap(ComponentPlacement.RELATED, 68, Short.MAX_VALUE)
					.addGroup(gl_adoMenu.createParallelGroup(Alignment.BASELINE)
						.addComponent(combo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(whereTxt, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addGap(18)
					.addGroup(gl_adoMenu.createParallelGroup(Alignment.BASELINE)
						.addComponent(findBtn)
						.addComponent(allData))
					.addGap(112))
		);
		adoMenu.setLayout(gl_adoMenu);

		
		
		/*
		 * 게시판 탭 패널
		 * 추후 구현 예정
		 */
		JPanel boardPenel = new JPanel();
		tabPanel.addTab("BOARD", null, boardPenel, null);
		
		
		
		
		/*
		 * 프로그램 최초 실행시 표시되는 패널
		 */
		JPanel indexPanel = new JPanel();
		mainPanel.add(indexPanel, "indexPanel");
		indexPanel.setLayout(new BorderLayout(0, 0));
		
		JPanel indexDog = new JPanel();
		indexPanel.add(indexDog, BorderLayout.WEST);
		
		JPanel indexBbs = new JPanel();
		indexPanel.add(indexBbs, BorderLayout.EAST);
		
		
		
		
		/*
		 * 회원 정보 표시 패널 
		 */
		JPanel myPanel = new JPanel();
		mainPanel.add(myPanel, "myPanel");
		
		
		
		
		/*
		 * 관리자 페이지 패널
		 */
		JPanel adminPanel = new JPanel();
		mainPanel.add(adminPanel, "adminPanel");
	}
}
